﻿using System;
using System.Net.Http;
using System.Threading.Tasks;
using Consul;

namespace Micro.Extensions.Bridge
{
    public interface IServiceManager : IDisposable
    {
        /// <summary>
        /// 获取服务节点信息
        /// </summary>
        /// <param name="serviceName"></param>
        /// <param name="hashKey"></param>
        /// <returns></returns>
        Task<ServiceEntry> GetServiceEntryAsync(string serviceName, string hashKey = null);
        /// <summary>
        /// 获取HttpClient
        /// </summary>
        /// <param name="serviceName"></param>
        /// <param name="hashKey"></param>
        /// <returns></returns>
        Task<HttpClient> GetHttpClientAsync(string serviceName, string hashKey = null);
    }
}